import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import PropTypes from 'prop-types'

const BottomBtn = ({onClick,text,colorClass,icon}) => {
  return (
    <button
      type='button'
      className={`btn btn-block no-border ${colorClass}`}
      onClick={onClick}
    >
     <FontAwesomeIcon className='mr-2' icon={icon} size='lg'></FontAwesomeIcon>
     <span>{text}</span>
    </button>
  )
}

BottomBtn.propTypes = {
  onClick: PropTypes.func,
  text: PropTypes.string,
  colorClass: PropTypes.string,
  icon:PropTypes.any
}

BottomBtn.defaultProps = {
  text:'新建',
  colorClass: 'primary'

}

export default BottomBtn